package cn.com.digitalnet.ad.entity;

import javax.persistence.Entity;
import javax.persistence.Table;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Map;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springframework.format.annotation.DateTimeFormat;

import com.google.common.collect.Maps;

import cn.com.digitalnet.ad.base.IdEntity;

@Entity
@Table(name = "tbl_self_construction")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SelfConstruction extends IdEntity {

	private String content;

	private String title;
	
	private Long times;
	
	private Long status;
	private String filename;

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
	private Date pubdate;

	private Long classify;

	private String attachment;

	private Long user;

	public static final Long TRAIN = 1L;
	public static final Long EXPERIENCE = 2L;

	public static final Map<Long, String> types = Maps.newHashMap();
	{
		types.put(TRAIN, "业务培训");
		types.put(EXPERIENCE, "经验交流");
	}
	
	public static final Long NORMAL = 1L;
	public static final Long REPAIR = 2L;
	
	public static final Map<Long, String> statuss = Maps.newHashMap();
	{
		statuss.put(NORMAL, "正常");
		statuss.put(REPAIR, "已修改");
	}

	public String getFilename() {
		return filename;
	}

	public void setFilename(String filename) {
		this.filename = filename;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Long getStatus() {
		return status;
	}

	public void setStatus(Long status) {
		this.status = status;
	}
	
	public Long getTimes() {
		return times;
	}

	public void setTimes(Long times) {
		this.times = times;
	}

	public Date getPubdate() {
		return pubdate;
	}

	public void setPubdate(Date pubdate) {
		this.pubdate = pubdate;
	}

	
	public Long getClassify() {
		return classify;
	}

	public void setClassify(Long classify) {
		this.classify = classify;
	}

	public String getAttachment() {
		return attachment;
	}

	public void setAttachment(String attachment) {
		this.attachment = attachment;
	}

	public Long getUser() {
		return user;
	}

	public void setUser(Long user) {
		this.user = user;
	}

}
